home *** CD-ROM | disk | FTP | other *** search
- property ancestor
-
- on new me, buttonName, castName, theChannel, theStageLoc, descendant
- if objectp(descendant) then
- ancestor = new(script("generic button"), buttonName, castName, theChannel, theStageLoc, descendant)
- else
- ancestor = new(script("generic button"), buttonName, castName, theChannel, theStageLoc, me)
- end if
- return me
- end
-
- on performFunction me
- global gResultsClassObj, gEnvironObj
- tell the stage
- playSFX(5)
- end tell
- repeat while soundBusy(1)
- end repeat
- txtObj = new(xtra("fileio"))
- if not objectp(txtObj) then
- beep()
- else
- pathAndFile = displaySave(txtObj, "Save hit list as:", "Untitled")
- txtObj = 0
- end if
- if not voidp(pathAndFile) and (pathAndFile <> EMPTY) then
- fileContents = "{RESULTS}" & RETURN
- put line 1 to 3 of field "criteria field" & RETURN after txtObj
- put line 1 of field "hitList field" & RETURN after txtObj
- put the text of field "results field" after txtObj
- saveTextFile(pathAndFile, fileContents, getTypeCreator(gEnvironObj))
- end if
- end
-